<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ include file="/common/include/dictNames.jsp"%>
<%@ page import="com.kylin.module.shop.orm.*,
                 com.kylin.common.util.*,
				 com.kylin.common.dict.orm.Dict,
                 com.kylin.common.paginate.DisplayPage,
			     com.kylin.module.user.orm.*"%>
			     
<%@ include file="companyTop.jsp"%> 

<mytag:MyActionMsg />
<%
DisplayPage dispage = null;
    if(request.getAttribute(Constants.KEY_REQUEST_RESULT   )!=null){
        dispage = (DisplayPage)request.getAttribute(Constants.KEY_REQUEST_RESULT);
    }

%>
<table cellpadding="0" cellspacing="0" class="comp04" align="center">

	<tr>
		<td colspan="2" class="comp0401">
			<bean:message key="company.81"/>
		</td>
	</tr>
	<tr>
<%
        int showNumber = 20;//最多展示20个
        
        for(int i=0;i<showNumber;i++){
           Product p = null;
           if(dispage != null && i < dispage.getList().size())
               p = (Product)dispage.getList().get(i);
%>
		<td width="50%" class="comp04td" valign="top"> 
<%
              if(p != null){
%>		
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td rowspan="2">
						<a href="/module/shop/_nodeco/shop.do?CMD=productDetail&id=<%=p.getId() %>" target="_blank">
						   <img src="/fileOutServlet?imgType=<%=Constants.IMG_PRODUCT %>&imgurl=<%=p.getImgurl() %>" 
						      width="80" height="80"> 	
                       </a>
					</td>
					<td>
						<%=p.getName() %> 
						<br>
						<%=JspHelper.checkNull(JspHelper.substring(p.getIntroduce(),400,"")) %> 
					</td>
				</tr>
<form name="fo<%=i %>" action="/module/shop/_nodeco/order.jsp" method="post" target="_blank">
	<input type="hidden" name="pid"       value="<%=p.getId()%>">
	<input type="hidden" name="pname"     value="<%=p.getName()%>">
	<input type="hidden" name="pquantity" value="<%=p.getQuantity()%>">
	<input type="hidden" name="pcurrency"     value="<%=p.getCurrency()%>">
	<input type="hidden" name="pprice"    value="<%=p.getPrice()%>">
	<input type="hidden" name="punit"     value="<%=p.getUnit()%>">
				<tr>
					<td align="right" colspan=2>
						<input name="button" type="submit" value="<bean:message key="company.82"/>">
					</td>
				</tr>
	</form>				
			</table>
<%
               }else{
                   out.println("&nbsp;<img  width='0' height='80'>");
               }
%>
		</td>
<%
        if(i%2==1) 
            out.println("</tr><tr>");
	}
%>

	</tr>
</table>
